<div style="width: 850px; min-height: 450px;">
    <form style="width: 850px;min-height: 300px;" novalidate name="stockOutForm">
        <div class="step-info">
            <div>
                <table class="steps" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr>
                        <td class="first-step" ng-class="{active: step == 1}">
                            <div>1.填写合同信息<span class="after"></span></div>
                        </td>
                        <td ng-class="{active: step == 2}">
                            <div><span class="before"></span>2.产品租用信息</div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!--直属正常-->
        <table class="mt10" style="width: 100%" ng-show="step == 1">
            <colgroup>
                <col style="width: 110px">
                <col>
            </colgroup>
            <tr>
                <td class="form-cell  pt10" valign="top">合同类型:</td>
                <td class="pt10">
                    <div class="clearfix radio-list"
                         ng-disabled="true"
                         ui-radio-array
                         list="stockOutType"
                         ng-model="currentStockOutType">
                    </div>
                </td>
            </tr>
            <tr ng-show="isAllowed() && isDirect()">
                <td class="form-cell  pt10" valign="top">特批类型:</td>
                <td class="pt10">
                    <div class="clearfix radio-list"
                         ng-disabled="true"
                         ui-radio-array
                         list="directAllowedType"
                         ng-model="currentDirectAllowedType">
                    </div>
                </td>
            </tr>
            <tr ng-show="isAllowed() && isAssociate()">
                <td class="form-cell  pt10" valign="top">特批类型:</td>
                <td class="pt10">
                    <div class="clearfix radio-list"
                         ng-disabled="true"
                         ui-radio-array
                         list="associateAllowedType"
                         ng-model="currentAssociateAllowedType">
                    </div>
                </td>
            </tr>
            <tr ng-if="isAllowed()">
                <td class="form-cell pt12 lh30" valign="top">
                    <span class="c-red">*</span>
                    承诺兑现日期:
                </td>
                <td class="pt12">
                    <div class="fl">
                        <input type="text"
                               ui-date
                               format="yyyy-MM-dd"
                               ng-model="data.order.promiseFulfilTime"
                               class="fl input-text input-data"
                               minDate="today"
                               name="promiseFulfilTime"
                               ng-disabled="true"
                               required
                               autocomplete="off"
                               style="width:286px">
                    </div>
                    <span class="fl w88 ml40 lh30 ta-r">
                    <span class="c-red">*</span>
                    兑现责任人:
                </span>
                    <div class="fl ml10">
                        <input type="text" class="input-text" placeholder="姓名" disabled
                               ng-model="data.order.promiseFulfilPrincipleName"
                               ng-if="!isDirect() || !isNormal()"
                               style="width:286px">
                    </div>
                </td>
            </tr>
            <tr>
                <td class="form-cell  pt10" valign="top">租户类型:</td>
                <td class="pt10">
                    <div class="clearfix radio-list fl lh30"
                         ng-disabled="true"
                         ui-radio-array
                         list="data.order.tenantType"
                         ng-model="data.order.currentTenantType">
                    </div>
                    <div class="fr" ng-if="isOldTenant()">
                        <span class="fl w88 lh30 ta-r"><em class="c-red">*</em>企业号:</span>
                        <div class="fl ml10">
                            <div class="search-box-border">
                                <input type="text" class="fl search-box" ng-model="orgCode" yk-dropdown
                                       disabled
                                       name="orgCode"
                                       placeholder="企业名称/企业号" style="width:286px" required>
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
            <tr ng-if="(isDirect() && isNormal()) || (isAllowed() && isDirect() && currentDirectAllowedType.value == '10')">
                <td class="form-cell pt12 lh30" valign="top"><span class="c-red">*</span>关联合同:</td>
                <td class="pt12">
                    <div class="search-box-border">
                        <input type="text" class="fl search-box" ng-model="contractCode" yk-dropdown
                               disabled
                               name="contractCode"
                               autocomplete="off"
                               placeholder="请输入合同编号、客户简称、顶级客户简称、签约人" style="width:100%" required>
                    </div>
                </td>
            </tr>
            <tr ng-if="(!(isDirect() && isNormal())) && (currentDirectAllowedType.value != '10')">
                <td class="form-cell pt12 lh30" valign="top"><span class="c-red">*</span>客户简称:</td>
                <td class="pt12">
                    <input type="text" class="fl input-text" placeholder="姓名" disabled
                           ng-model="data.order.customerName"
                           autocomplete="off"
                           style="width:690px">
                </td>
            </tr>
            <tr>
                <td class="form-cell pt12 lh30" valign="top">
                    <span ng-if="isDirect() && isNormal()">客户名称:</span>
                    <span ng-if="!(isDirect() && isNormal())"><span class="c-red">*</span>客户全称:</span>
                </td>
                <td class="pt12">
                    <span ng-if="isDirect() && isNormal()">
                        <input type="text" class="fl input-text" placeholder="签约客户简称"
                               ng-model="data.order.customerName"
                               name="customerName"
                               autocomplete="off"
                               disabled
                               style="width:301px">
                        <input type="hidden" class="fl" autocomplete="off" ng-model="data.order.orgCode">
                    </span>
                    <span class="fl" ng-if="!(isDirect() && isNormal())">
                        <input type="text" class="fl input-text" placeholder="签约客户全称"
                               ng-model="data.order.customerFullName"
                               name="customerFullName"
                               autocomplete="off"
                               disabled
                               ng-required="!(isDirect() && isNormal())" style="width:301px">
                        <input type="hidden" class="fl" autocomplete="off" ng-model="data.order.orgCode">
                    </span>
                    <div ng-if="isNewTenant()">
                        <span class="fl w88 ml40 lh30 ta-r">
                            <span class="c-red" ng-if="!(isDirect() && isNormal())">*</span>租户名称:
                        </span>
                        <div class="fl ml10">
                            <input type="text" class="fr input-text" name="topCustomerName"
                                   ng-model="data.order.topCustomerName"
                                   ng-required="!(isDirect() && isNormal())"
                                   autocomplete="off"
                                   disabled
                                   placeholder="顶级客户简称" style="width:301px">
                        </div>
                    </div>
                </td>
            </tr>
            <tr ng-if="(isDirect() && isAllowed()) && (currentDirectAllowedType.value != '10')">
                <td class="form-cell pt12 lh30" valign="top"><span class="c-red">*</span>签约金额(元):</td>
                <td class="pt12">
                    <input type="number" class="input-text" name="signAmount" ng-model="data.order.signAmount"
                           disabled
                           autocomplete="off"
                           style="width:301px" required>
                </td>
            </tr>
            <tr>
                <td class="form-cell pt12 lh30" valign="top">
                    <span class="c-red" ng-if="!(isDirect() && isNormal())">*</span>合同签约人:
                </td>
                <td class="pt12">
                    <div class="clearfix">
                        <input type="text"
                               class="fl input-text"
                               ng-model="data.order.signPeopleName"
                               autocomplete="off"
                               placeholder="姓名"
                               disabled
                               style="width:230px">
                        <input type="text" class="fl ml10 input-text" placeholder="手机号码"
                               autocomplete="off"
                               ng-model="data.order.signPeoplePhone"
                               disabled style="width:244px">
                        <input type="text" class="fl ml10 input-text" placeholder="邮箱"
                               autocomplete="off"
                               ng-model="data.order.signPeopleEmail"
                               disabled
                               style="width:244px">
                    </div>
                </td>
            </tr>
            <tr>
                <td class="form-cell pt12 lh30" valign="top"><span class="c-red">*</span>交付人员:</td>
                <td class="pt10">
                    <div class="clearfix">
                        <input type="text" class="fl input-text" placeholder="姓名" disabled
                               ng-model="data.order.adviserName"
                               autocomplete="off"
                               style="width:230px">
                        <input type="text" class="fl ml10 input-text" placeholder="手机号码" disabled
                               ng-model="data.order.adviserTel"
                               autocomplete="off"
                               style="width:244px">
                        <input type="text" class="fl ml10 input-text" placeholder="邮箱" disabled
                               ng-model="data.order.adviserMail"
                               autocomplete="off"
                               style="width:244px">
                    </div>
                </td>
            </tr>
            <tr ng-show="isAssociate()">
                <td class="form-cell pt12 lh30" valign="top">合同附件:</td>
                <td class="form-cell pt12 lh30">
                    <div ng-repeat="file in data.attachments" style="display: inline-block;">
                        <div style="height: 28px;display: inline-block;margin-right: 20px">
                            <a href="{{file.path}}">{{file.filename}}</a>
                        </div>
                    </div>
                </td>
            </tr>
            <tr ng-if="isAssociate()">
                <td class="form-cell pt12 lh30" valign="top"></td>
                <td class="form-cell c-gray" ng-if="isNormal()">请上传合同附件和付款回执，否则将会审核不通过</td>
                <td class="form-cell c-gray" ng-if="isAllowed()">请上传合同附件和付款回执，否则会审核不通过，如果无合同扫描件，请上传合同Word版本</td>
            </tr>
        </table>
        <!--直属正常-->
        <!--填写合同信息-->
        <!--产品租用信息-->
        <div class="mt20" ng-show="step == 2">
            <div class="table-wrap" id="table-wrap" style="height: 210px;overflow-x: hidden;overflow-y: scroll;">
                <table style="width: 100%;">
                    <tr>
                        <th>产品名称</th>
                        <th ng-if="hasContract">授权产品数/短信条数</th>
                        <th>租用周期（月）</th>
                        <th ng-if="hasContract">当前可用产品数/短信条数</th>
                        <th>本次申请开通产品数</th>
                        <th>租期开始时间</th>
                        <th>合同属性</th>
                        <th>项目名称</th>
                    </tr>
                    <tr ng-repeat="product in data.products | applyNum:true">
                        <td>{{ product.applicationName }}</td>
                        <td ng-if="hasContract">{{ product.authorizationNumeric }}</td>
                        <td>
                            <input type="number" autocomplete="off" ng-model="product.rentPeriod" disabled>
                        </td>
                        <td ng-if="hasContract">{{ product.authorizationNumeric - product.usedAuthorizationNumeric }}
                        </td>
                        <td ng-if="hasContract">
                            <input type="number" autocomplete="off"
                                   ng-model="product.applyNum"
                                   disabled min="0" style="width: 100%;">
                        </td>
                        <td ng-if="!hasContract">
                            <input type="number" autocomplete="off" ng-model="product.applyNum" min="0"
                                   style="width: 100%;"
                                   disabled>
                        </td>
                        <td>
                            {{ product.rentStartDate | date:'yyyy-MM-dd' }}
                        </td>
                        <td>
                            {{ product.contractType | authorizationType }}
                        </td>
                        <td>
                            <div class="search-box text-hide"
                                 style="width:120px"
                                 title="{{product.bindProjectNames}}"
                                 ng-bind="product.bindProjectNames"
                                 ng-if="product.bindProjectNames">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
    <div class="ui-dialog-footer" style="padding: 20px 0 0;">
        <div class="ui-dialog-statusbar" style="display: none;"></div>
        <div class="ui-dialog-button">

            <!-- 任何状态 -->
            <button type="button" i-id="prev" ng-click="prev()" class="ui-dialog-autofocus"
                    ng-hide="step === 1">上一步
            </button>
            <button type="button" i-id="next" ng-click="next()" class="ui-dialog-autofocus"
                    ng-hide="step === 2">下一步
            </button>
            <!-- 任何状态 -->

            <!-- 任何状态 -->
            <button type="button" i-id="cancel" ng-click="close()">取消</button>
            <!-- 任何状态 -->
        </div>
    </div>
</div>
